<template></template>

<script>
  import { loginPage, homePage, tokenContainer } from "../static/js/config";
  export default {
    // component property
    onLoad() {
      uni.showLoading({ title: "Loading...", mask: true });
      let url = uni.getStorageSync(tokenContainer) ? homePage : loginPage;
      // #ifdef MP-WEIXIN
      url = homePage;
			
      // #endif
      uni.reLaunch({
        url,
        fail: (err) => uni.showToast({ title: err.errMsg, icon: "none" }),
        success: uni.hideLoading,
      });
    },
  };
</script>

<style lang="scss" scoped>
  // scss
</style>